 nn4 = (document.layers)? true : false;
 ie4 = (document.all)? true : false;

 function putElem1(elemId)
 { if (ie4) document.all[elemId].style.display = "block";
   else document.getElementById(elemId).style.display = "block";
 }
 function removeElem1(elemId)
 { if (ie4) document.all[elemId].style.display = "none";
   else document.getElementById(elemId).style.display = "none";
 }
 function Editor1()
 { if (ie4) document.all['layer12'].style.display = "none";
   else document.getElementById('layer12').style.display = "none";
   if (ie4) document.all['layer11'].style.display = "block";
   else document.getElementById('layer11').style.display = "block";
   iView1.document.body.innerHTML = document.f1.short_new.value;
   EditMode1=1;
 }
 function Init1()
 { iView1.document.designMode = 'On';
   if (ie4) document.all['layer12'].style.display = "none";
   else document.getElementById('layer12').style.display = "none";
   if (ie4) document.all['layer11'].style.display = "block";
   else document.getElementById('layer11').style.display = "block";
     EditMode1=1;
 }
 function Html1()
 { if (ie4) document.all['layer11'].style.display = "none";
   else document.getElementById('layer11').style.display = "none";
   if (ie4) document.all['layer12'].style.display = "block";
   else document.getElementById('layer12').style.display = "block";
   document.f1.short_new.value = iView1.document.body.innerHTML;
   EditMode1=0;
 }
 function bold1()
 { iView1.document.execCommand('bold', false, null);
 }
 function Italic1()
 { iView1.document.execCommand('italic', false, null);
 }
 function Underline1()
 { iView1.document.execCommand('Underline', false, null);
 }
 function Left1()
 { iView1.document.execCommand('JustifyLeft', false, null);
 }
 function Center1()
 { iView1.document.execCommand('JustifyCenter', false, null);
 }
 function Justify1()
 { iView1.document.execCommand('JustifyFull', false, null);
 }
 function Right1()
 { iView1.document.execCommand('JustifyRight', false, null);
 }
 function List1()
 { iView1.document.execCommand('InsertUnorderedList', false, null);
 }
 function FontColor1(color)
 { iView1.document.execCommand('forecolor', false, color); 
   HideFont1();
 }
 function FontName1(font)
 { iView1.document.execCommand('FontName', false, font); 
 } 
 function FontSize1(size)
 { iView1.document.execCommand('FontSize', false, size); 
 }  
 function Font1()
 { var x = document.body.scrollLeft + event.x - 20;
   var y = document.body.scrollTop + event.y + 20;
   if (ie4) { document.all['color1'].style.visibility = "visible";
   document.all['color1'].style.left =x; document.all['color1'].style.top =y;
            } else { 
   document.getElementById('color1').style.visibility = "show";
   document.layers['color1'].left =x; document.layers['color'].Top =y;
 }                 } 
 function HideFont1()
 { if (ie4) document.all['color1'].style.visibility = "hidden";
   else document.getElementById('color1').style.visibility = "hidden";
 }                 
 function Save1()
 { if (EditMode1==1) document.f1.short_new.value = iView1.document.body.innerHTML;
 }
 function GetText1()
 { iView1.document.selection.createRange().text="{-}"+
   iView1.document.selection.createRange().text;
   document.f1.seltext.value = iView1.document.selection.createRange1().text;   
   document.f1.short_new.value = iView1.document.body.innerHTML;
 }